// /*
//  * @Author: WanYiMing
//  * @Date:2024-05-24-11:14
//  * @Description:
//  */

using System.IO;
using UnityEngine;

namespace Code.DataManager
{
    public class DataForJson
    {
        public static T GetBlockJsonBoForJson<T>(string path)
        {
            //string类型的数据常量
            string readData;
            //获取到路径
            string fileUrl = Application.streamingAssetsPath + path;
            //读取文件
            using (StreamReader sr = File.OpenText(fileUrl))
            {
                //数据保存
                readData = sr.ReadToEnd();
                sr.Close();
            }

            //解析数据
            return JsonUtility.FromJson<T>(readData);
        }
    }
}